package com.example.book_springboot.mapper;

import com.example.book_springboot.pojo.Book;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface BookMapper {
    //查询所有
    List<Book> getBooklastAll();

    //按名字模糊查询
    List<Book> getBookByBookName(@Param("bookName")String bookName);

    //添加
    int addBook(Book book);

    //删除
    int delBook(Integer bookId);

    //获取一个对象
    Book getBookById(String bookId);

    //修改
    int updateBook(Book book);
}
